package com.duapk.index;

import com.duapk.index.conf.ConfigFactory;
import com.duapk.index.conf.LogConfig;
import com.duapk.index.work.IndexProxy;
import com.duapk.nlp.constant.ChineseConstants;

/**
 * 手动创建索引
 * 
 * @Package: com.duapk.index
 * @ClassName: IndexCreate
 * @author: jiangzheng
 * @date: Apr 5, 2011 5:59:42 PM
 * 
 */
public class IndexCreate {

	public static void main(String[] args) {
		if (args.length < 2) {
			System.out
					.println("Please usage: java Start logback.xml config.xml");
			System.exit(1);
		}
		ConfigFactory.init(args[1]);
		LogConfig.config(args[0]);
		if (System.getProperty(ChineseConstants.CHINESE_WORD_PATH) == null) {
			System.setProperty(ChineseConstants.CHINESE_WORD_PATH,
					ConfigFactory.getString("Path.modelsDir"));
		}
		// 创建索引
		IndexProxy.index();
	}

}
